<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box{
            width: 900px;
            height: 600px;
            border: 1px solid red;
            box-sizing: border-box;
            margin:0 auto; 
            display:flex;
            /* justify-content: space-around; */
            /* justify-content: space-between; */
            /* justify-content: flex-start; */
            /* justify-content: flex-end; */
            /* justify-content: center; */
           
            flex-wrap:wrap;
            /* flex-direction: column; 
             */
        }

        .first{
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .second{
            width: 200px;
            height: 200px;
            background-color: green;
        }
        .third{
            width: 200px;
            height: 200px;
            background-color: blue;
        }
        .fourth{
            width: 200px;
            height: 200px;
            background-color: pink;
        }
    .fifth{
            width: 200px;
            height: 200px;
            background-color: purple;
        } 
    </style>
</head>
<body>
    <!-- 父元素
   1.开启弹性布局 display:flex; -->
   /* justify-content: space-around; */ 二边有间距
   /* justify-content: space-between; */二边无间距
   /* justify-content: flex-start; */ 从左边开始
   /* justify-content: flex-end; */ 从右边开始
   /* justify-content: center; */从中间开始
   flex-wrap:wrap; 换行
   /* flex-direction: column; 主甲骨文
    */
    <!-- flex-direction:column -->
    <div class="box">
            <div class="first">1</div>
            <div class="second">2</div>
            <div class="third">3</div>
            <div class="fourth">4</div>
            <div class="fifth">5</div>
        </div>

</body>
</html>